<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><?php echo $title_for_layout; ?></title>
        <?=$html->css('admin', 'stylesheet', array("media"=>"all" ));?>
        <?=$html->charset('utf-8'); ?>
        <?=$javascript->link('jquery');?>
        <link rel="shortcut icon" href="<?=$baseUrl?>/webroot/img/themes/favicon.png" type="image/x-icon">
    </head>
    <body style="background: url(<?=$baseUrl?>/webroot/img/themes/admin-back.png) repeat-x;color:#808080;">
        <script>
                function countIncomingComments(){
                    $.ajax({
                        type: "GET",
                        dataType: "json",
                        url: "<?=$baseUrl?>/comments/status",

                        success: function(data){
                             if(data != '0'){
                                $('#commentValue').empty().append('('+data+')');
                             }
                        }
                    });
                }
        </script>        
        <div id="container">
            <div id="admin-header">
                <div class="admin-header"><strong><?=$html->link('Dashboard','/posts/home')?></strong></div>
                <div class="admin-header"><strong><?=$html->link('Post a New logo','/posts/add')?></strong></div>
                <div class="admin-header"><strong><a href="<?=$baseUrl?>/comments/manage">Comments <span id="commentValue"><script>$(document).ready(function(){countIncomingComments();});</script></span></a></strong></div>
                <div class="admin-header"><strong><?=$html->link('Edit & Manage Logo','/posts/manage')?></strong></div>
                <div class="admin-header-right"><strong><?=$html->link('Logout','/users/logout')?></strong></div>
                <div class="admin-header-right"><strong><?=$html->link('Setting','/users/setting')?></strong></div>
                <div class="admin-header-right"><strong><?=$html->link('[visit site]','/')?></strong></div>
                <div class="clear"></div>
            </div>
            <!-- End of header -->

            <?php echo $content_for_layout; ?>
            <div class="clear"></div>
            <!-- End of content -->

        </div>
    </body>
</html>